package boot3.service.impl;

import boot3.mapper.UserMapper;
import boot3.pojo.User;
import boot3.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByID(String id) {
        return userMapper.findByID(id);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public List<User> findByType(String type) {
        return userMapper.findByType(type);
    }

    @Override
    public Boolean byIdAlterPassword(String userID, String NewPassword) {
        return userMapper.byIdAlterPassword(userID,NewPassword);
    }

    @Override
    public String getUserName(String userID) {
        return userMapper.getUserName(userID);
    }

    @Override
    public Boolean setUserName(String userID, String value,String item) {
        return userMapper.setUserName(userID,value,item);
    }
}
